package com.javaweb.dao;

import com.javaweb.model.Permission;
import com.javaweb.model.Role;

import java.sql.SQLException;
import java.util.List;

/**
 * @desc:
 * @author: Ping
 * @date: 2024/9/24 22:28
 */

public interface RoleDao {

    public Integer insert(Role role)  throws SQLException;

    public Integer insertRolePerm(Role role, Permission perm)  throws SQLException ;
    public List<Role> selectRolesByUserName(String username)  throws SQLException ;
    public List<Role> selectRolesByUserId(int userId)  throws SQLException;

    public void deleteByRoleId(int roleId)  throws SQLException;

    public void deleteUserRole(int userId, int roleId)  throws SQLException;


}
